<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>选择人员</title>
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="../css/pop-page.css" />
	<script type="text/javascript" src="../easyui/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../js/win.js"></script>
	<script type="text/javascript">
	function selectUser(){
		var rows = $("#dg").datagrid('getSelections');
		if (rows.length == 0){
			$.messager.alert("提示", "&nbsp;&nbsp;<br/>请选择一条记录!", "info");
		} else {
			var ids = "";
	        var arrId = [];
	        for (i=0;i<rows.length;i++){
	            arrId.push(rows[i].id);
	        }
	        ids = arrId.join(",");
			parent.selectUsers(ids);
		}
	}
	</script>
</head>
<body class="easyui-layout">
	<div data-options="region:'center',border:false">
		<div class="dg-content">
			<table id="dg" class="easyui-datagrid" title="人员列表"
				data-options="rownumbers:true,pagination:true,
					fitColumns:true,iconCls:'icon-users',url:'../user/listUsers.do'">
				<thead>
					<tr>
						<th data-options="field:'ck',checkbox:true"></th>
						<th data-options="field:'id',hidden:true"></th>
						<th data-options="field:'name',width:100,align:'center'">姓名</th>
						<th data-options="field:'username',width:80,align:'center'">用户名</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>	
	<div data-options="region:'south'" class='fm-btn'>
		<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="selectUser()">确定</a>
	</div>
</body>
</html>